<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
</head>
<style type="text/css">
    .inputclass {
        height:25px;
        width:150px;
    }
    .textclass {
        height:25px;
        width:45px;
    }
    .sureclass{
        height:45px;
        width:65px;
        background: deepskyblue;
        float: left;
    }
    .quxiaoclass{
        height:45px;
        width:65px;
        background: red;
        float: left;
    }
    .tableclass{
        border-collapse:separate;
        border-spacing:50px 28px;  /*第一个设置水平间距，而第二个设置垂直间距*/
        float: left;
        border: 0;
    }
.divclass{
    background: rgba(169, 169, 169, 0.22);
    width: 0.05em;
    height:500px;
    float: left;

}
</style>
<body>
    <form action="/doc/add" id="myForm" method="post" enctype="multipart/form-data">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="form-horizontal">
                    <div class="row">
                        <!--<table border="1" class = "tableclass">-->
                            <table class = "tableclass">
                                    <tr>
                                        <td class = "textclass">标识码</td>
                                        <td><input id="standardCode" name="standardCode" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                    <td>名称</td>
                                        <td><input id="standardName" name="standardName" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                        <td>批号</td>
                                        <td><input id="standardId" name="standardId" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                        <td>是否过期</td>
                                        <td>
                                            <select id="standardPeriodYn" name="standardPeriodYn" underline="true" class="inputclass">
                                                <option value="0">是</option>
                                                <option value="1">未过期</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>来源</td>
                                        <td><input id="standardOrigin" name="standardOrigin" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                        <td>规格大小</td>
                                        <td><input id="standardSize" name="standardSize" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                        <td>用途</td>
                                        <td><input id="standardUse" name="standardUse" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                        <td>生产日期</td>
                                        <td><input id="standardDate" name="standardDate" type="date" underline="true" class="inputclass"/></td>
                                    </tr>
                                    <tr>
                                        <td><input type="submit" id = "sId" value="提交" class = "sureclass" onclick="StandardInfoDlg.close()"/></td>
                                    <td><input name="" type="button" onClick="window.close();" value="取消" class = "quxiaoclass"/></td>
                                    <!--<td><button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="StandardInfoDlg.close()"/></td>-->
                            </tr>
                            </table>

                        <div class = "divclass"></div>

                             <table class = "tableclass">
                                 <tr>
                                    <td>有效期</td>
                                    <td><input id="standardPeriod" name="standardPeriod" underline="true" class="inputclass"/></td>
                                 </tr>
                                 <tr>
                                    <td>存储路径</td>
                                    <td><input id="standardPath" name="standardPath" underline="true" class="inputclass"/></td>
                                 </tr>

                                 <tr>
                                     <td>标号</td>
                                     <td><input id="standardLabel" name="standardLabel" underline="true" class="inputclass"/></td>
                                 </tr>
                                 <tr>
                                    <td>物质类型</td>
                                    <td><select id="standardType" name="standardType" underline="true" class="inputclass">
                                        <option value="0">对照品</option>
                                        <option value="1">标准物质</option>
                                    </select></td>
                                 </tr>
                                 <tr>
                                    <td>存储条件</td>
                                    <td><input id="standardCondition" name="standardCondition" underline="true" class="inputclass"/></td>
                                 </tr>
                                 <tr>
                                    <td>单价</td>
                                    <td><input id="standardPrice" name="standardPrice" underline="true" class="inputclass"/></td>
                                 </tr>

                                 <tr>
                                    <td>登记人</td>
                                    <td><input id="standardPersion" name="standardPersion" underline="true" class="inputclass"/></td>
                                 </tr>

                                 <tr>
                                     <td>上传附件</td>
                                     <td><input type="file" name="file" id="file" class="inputclass"></td>
                                 </tr>
                             </table>
                       <!-- </table>-->
                    </div>
                </div>
            </div>
        </div>
     </form>
</body>
<script src="${ctxPath}/static/modular/standard/standard/standard_info.js"></script>
<script>
    StandardInfoDlg.close = function() {
        parent.layer.close(window.parent.Standard.layerIndex);
    }
    StandardInfoDlg.addSubmit = function() {
        this.clearData();
        this.collectData();

        //提交信息
        var ajax = new $ax(Feng.ctxPath + "/standard/add", function(data){
            /* $('#file').parents('form').attr('enctype', 'multipart/form-data').get(0).encoding = 'multipart/form-data';*/
            Feng.success("添加成功!");
            window.parent.Standard.table.refresh();
            StandardInfoDlg.close();
        },function(data){
            Feng.error("添加失败!" + data.responseJSON.message + "!");
        });
        ajax.set(this.standardInfoData);
        ajax.start();
    }
</script>
</html>